import request from "@/utils/request";

export function getBuilding(method, data) {
  if (method == "post") {
    return request({
      url: "/building",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/building",
      method: method,
      params: data,
    });
  }
}
export function getFloor(method, data) {
  if (method == "post") {
    return request({
      url: "/floor",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/floor",
      method: method,
      params: data,
    });
  }
}
export function getRoom(method, data) {
  if (method == "post") {
    return request({
      url: "/room",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/room",
      method: method,
      params: data,
    });
  }
}
export function getBed(method, data) {
  if (method == "post") {
    return request({
      url: "/bed",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bed",
      method: method,
      params: data,
    });
  }
}
